<template>
  <div class="home-banner">
    <XtxSlider :sliders="bannerList"></XtxSlider>
  </div>
</template>

<script>
// import { ref } from 'vue'
// import { findBannerApi } from '@/api/home.js'
import { userbanner } from '../sereve.js'
export default {
  // setup不支持使用async修饰
  setup() {
    // 定义轮播图数据
    const bannerList = userbanner()
    // const bannerList = ref([])
    // findBannerApi().then(res => {
    //   bannerList.value = res.result
    //   // console.log(res)
    // })
    return { bannerList }
  }
}
</script>

<style scoped lang="less">
.home-banner {
  width: 1240px;
  height: 450px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 98;
}
</style>
